<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0" name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
	<script type="text/javascript" src="__dotnar_lib_base_url__/js/lib/require.min.js"></script>
	<script type="text/javascript" src="__dotnar_lib_base_url__/js/lib/loader.js"></script>
    <script type="text/javascript" src="/js/require.config.js"></script>
    <script type="text/javascript">
    require(["core"], function() {
    	require(["./js/pages/pay","./js/tools/getarea"],function (argument) {
        	window.removeLoader();       	
    	});
    });
    </script>
	<title></title>
</head>
<body>
	<div style="display:none;" id="jSouperApp" class="_pc">
		{{#include "pages/default/top.html"}}
		<xmp>
			<div class="fcart">
				<!-- 收货人信息,支付方式，商品清单 -->
				<div class="ftitle">支付订单</div>

				<div class="order_detail">
					<div class="titleindex">填写并核对订单信息{{aa}}</div>

					<div class="item">
						<div class="title2">收货信息</div>
						<div class="info">
							<div class="addr">
								<div class="useaddr">
								{{#if user.pay_ach.info.user_address}}
									<h4>当前选择的收货地址：</h4>
									<span>
										{{user.pay_ach.info.user_address.name}}，
										{{user.pay_ach.info.user_address.mobilenumber}}，
										{{user.pay_ach.info.user_address.province}}
										{{user.pay_ach.info.user_address.town}}
										{{user.pay_ach.info.user_address.county}}，
										{{user.pay_ach.info.user_address.detail}}
									</span>
								{{#else}}
								<p>请选择收获地址</p>
								{{/if}}
								</div>
							</div>
							{{#if user.pay_ach.info.state==$Top.config.ACH_STATE.未确认}}
							{{#each user.address_detail}}
							<div class="addr"><label style="cursor: pointer;">
								<input type="radio" name="addr" checked="{{$Top.user.pay_ach.info.user_address._id}}" value="{{_id}}" event-click="{{'$Top.$Event.pays.change_user_address'}}"/>
								<span>
								{{name}}，{{mobilenumber}} {{phonenumber&&("/"+phonenumber)}}，{{province}}{{town}}{{county}}，{{detail}}</span></label>
							</div>
							{{/each}}
							<div class="add_address">
								<div class="text">
									<div class="addr">
										<select class="province" name="province" event-change={{'$Event.province'}}>
											<option class="first" value="0">请选择省</option>
											{{#each city_list}}
												<option rel="{{region_id}}" value="{{region_name}}">
													{{region_name}}
												</option>
											{{/each}}
										</select>

										<select class="city" name="city" disabled event-change={{'$Event.city'}}>
											<option class="first" value="0">请选择市</option>
										</select>

										<select class="county" name="area" disabled>
											<option class="first" value="0">请选择地区</option>
										</select>

										<input type="text" class="detailed_addre" title="详细地址" name="detailed_addre" placeholder="详细地址" maxlength="25" />
									</div>

									<div class="connect">
										<input type="text" name="name" class="name" placeholder="收货人" title="收货人" maxlength="12" />
										<input type="text" name="mobile_num" class="mobile_num" title="联系手机" placeholder="联系手机" maxlength="11" />
										<input type="text" name="phone_num" title="座机号码" class="phone_num" placeholder="座机号码" maxlength="11" />
									</div>
								</div>

								<div class="btn">
									<button event-click="{{'$Event.add_user_address'}}">添加地址</button>
								</div>
							</div>
							{{/if}}
						</div>
					</div>

					<div class="item">

						<div class="title2">支付方式：
							{{#if user.pay_ach.info.pay_method=="partner_trade_by_buyer"}}
							使用支付宝的快捷支付
							{{/if}}
							{{#if user.pay_ach.info.pay_method=="payment_in_cash"}}
							货到付款
							{{/if}}
						</div>
						{{#if user.pay_ach.info.state==$Top.config.ACH_STATE.未确认}}
						<div class="info">
							<div class="pay-type"><label style="cursor: pointer;">
								<input checked="{{user.pay_ach.info.pay_method}}" type="radio" bind-input="{{'$Cache.pays.buy_method'}}" name="pay-type" value="partner_trade_by_buyer" event-change="{{'$Event.pays.change_pay_method'}}" disabled="{{!(bus_info.info.alipay.seller_email&&bus_info.info.alipay.key&&bus_info.info.alipay.partner)}}"/>支付宝
								<span>使用支付宝的快捷支付</span></label>
							</div>
							<div class="pay-type"><label style="cursor: pointer;">
								<input checked="{{user.pay_ach.info.pay_method}}" type="radio" bind-input="{{'$Cache.pays.buy_method'}}" name="pay-type" value="payment_in_cash" event-change="{{'$Event.pays.change_pay_method'}}" disabled="{{bus_info.permission.can_only_online_pay}}" />货到付款
								<span>用于大金额订单</span></label>
							</div>
							<div class="pay-type"><label style="cursor: pointer;">
								<input checked="{{user.pay_ach.info.pay_method}}" type="radio" bind-input="{{'$Cache.pays.buy_method'}}" name="pay-type" value="weixin_pay" event-change="{{'$Event.pays.change_pay_method'}}" disabled="{{bus_info.permission.can_only_online_pay}}" />微信支付
								<span>使用微信扫描支付</span></label>
							</div>
							<!-- <div class="pay-type">
								<input type="radio" name="pay-type" value="1" />邮局汇款
								<span>通过快钱平台收款 汇款后1-3个工作日到账</span>
							</div> -->
						</div>
						{{/if}}
					</div>

					<div class="item">
						<div class="title2">商品清单</div>
						<div class="info">
							<table>
								<thead>
									<td class="goods">商品</td>
									<td class="price">价格</td>
									<td class="discount">优惠</td>
									<td class="count">数量</td>
								</thead>
								{{#each user.pay_ach.info.goods_info}}
								<tr>
									<td>
										<div>
										<a href="/goods-details.html?id={{goods._id}}#default/comments">{{goods.goods_name}}</a>
										</div>
										<div>
											商品编号：{{goods._id}}
										</div>
									</td>
									<td><!-- {{goods.cash||goods.price}} -->{{#Fixed goods.price}}</td>
									<td>{{(goods.price-goods.cash)||0}}</td>
									<td>{{num}}</td>
								</tr>
								{{/each}}
							</table>

							<div class="money">
								<div class="money-item">
									<div class="left">商品总金额：</div>
									<div class="right">{{#Fixed user.pay_ach.sou_cash}}</div>
								</div>
								<div class="money-item">
									<div class="left">打折优惠：</div>
									<div class="right">{{#Fixed (user.pay_ach.sou_cash-(user.pay_ach.cash+user.pay_ach.bind_acc||0))||0}}</div>
								</div>
								<div class="money-item">
									<div class="left">推荐返利金额抵消：</div>
									<div class="right">{{#Fixed (user.pay_ach.bind_acc)||0}}</div>
								</div>
								<div class="money-item">
									<div class="left">应付金额：</div>
									<div class="right">
										{{#if user.pay_ach.cus_cash}}
											<span>
											<del>{{#Fixed user.pay_ach.cash}}</del>
											改：{{#Fixed user.pay_ach.cus_cash}}
											</span>
										{{#else}}
											<span>{{#Fixed user.pay_ach.cash}}</span>
										{{/if}}
									</div>
								</div>
							</div>
						</div>
					</div>

					<div class="item">
						<div class="coupon">
						{{#if user.pay_ach.coupon_id}}
							使用优惠码：{{user.pay_ach.coupon_id}}
						{{#else}}
							{{#if user.pay_ach.info.state==$Top.config.ACH_STATE.未确认}}
							<label for="coupon">请输入优惠码：
								<input type="text" class="android" value="{{$Cache.pay_ach.coupon_id}}" bind-input="{{'$Cache.pay_ach.coupon_id'}}">
								<button event-click="{{'$Event.pay_ach.bind_coupon'}}">绑定优惠码</button>
								<i>绑定优惠码后不能再修改订单</i>
							</label>
							{{/if}}
						{{/if}}
						<div class="bus_bind">
						{{#if user.pay_ach.bind_acc}}
							使用 <b>推荐返利</b> 的抵消金额：￥<span>{{#Fixed user.pay_ach.bind_acc}}</span>
						{{#else}}
							{{#if $Cache.bus_bind._money>0}}
								使用抵扣金额（可用抵扣金额：<span>{{#Fixed $Cache.bus_bind._money}}</span>）：
								<inputnumber min="0" max="{{(user.pay_ach.cus_cash||user.pay_ach.cash)>$Cache.bus_bind._money?$Cache.bus_bind._money:(user.pay_ach.cus_cash||user.pay_ach.cash)}}" fixed="2" bind-input="{{'$Cache.pay_ach.bind_acc'}}"></inputnumber>
								<button event-click="{{'$Event.pay_ach.bind_acc'}}">确定抵扣金额</button>
								<i>确定后不能再修改抵扣额度</i>
							{{#else}}
								<i>无可用的抵扣金额（来自推荐返利）</i>
							{{/if}}
						{{/if}}
						</div>
						</div>
				        {{#> "user_ach_controller","user.pay_ach"}}
					</div>

				</div>
			</div>
		</xmp>
		{{#include './pages/default/bottom.html'}}
	</div>

	<!-- bottom -->
<!-- 	<div id="bottom">
		<hr />
		<div>
			© 2013-2014 Dotnar.com 版权所有
		</div>
		
		<div>
			网站备案号：沪ICP备13010069号-4
		</div>
	</div> -->
</body>
</html>




 
